/**
 * Author:yuiop
 * Date:2022/8/25 19:06
 */
package com.devops.admin.config;

import com.devops.admin.collector.DevopsCollector;
import com.devops.admin.collector.OtherPlatformCollector;
import io.prometheus.client.CollectorRegistry;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class PromusConfig {
    @Autowired
    private CollectorRegistry collectorRegistry;

    @Bean
    public DevopsCollector myCustomCollector() {
        return  new DevopsCollector().register(collectorRegistry);
    }

    @Bean
    public OtherPlatformCollector otherPlatformCollector() {
        return new OtherPlatformCollector().register(collectorRegistry);
    }


}
